package pl.matt.service.impl;

import java.util.Collection;

import pl.matt.media.manager.MediaManagersFactory;
import pl.matt.model.Frame;
import pl.matt.model.FrameRegion;
import pl.matt.model.FrameRegionType;
import pl.matt.model.Rectangle;
import pl.matt.service.ExtractorService;

public class LeftEyeExtractorService extends AbstractEyeExtractorService implements ExtractorService {

	@Override
	protected int getDX(Frame frame) {
		FrameRegion faceRegion = getRegion(frame);
		int dx = faceRegion.getX();
		return dx;
	}
	
	@Override
	protected FrameRegionType getFrameRegionType() {
		return FrameRegionType.LEFT_EYE;
	}

	@Override
	protected Collection<Rectangle> detectRectangles(String imageFilePath) {
		Collection<Rectangle> rectangles = MediaManagersFactory.getObjectsDetectorManager().detectLeftEyes(imageFilePath);
		return rectangles;

	}
	
}
